#pragma once

#include "ILayer.h"
#include <boost/shared_ptr.hpp>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>

class IStack
{
public:
	
	friend class boost::serialization::access;	
	virtual const boost::shared_ptr<ILayer>& getLayer(const std::string& name) const = 0;
	virtual void addLayer(const boost::shared_ptr<ILayer>& layer) = 0;
	virtual void removeLayer(const std::string& name) = 0;
	virtual StackUtils::e_Status Encode(CPacket& packet) = 0;
	virtual StackUtils::e_Status Decode(CPacket& packet) = 0;
	virtual void init() = 0;

	template<class Archive> 
	void serialize(Archive & ar, const unsigned int version) 
	{

	}

	virtual ~IStack(void)
	{
	}
};

BOOST_SERIALIZATION_ASSUME_ABSTRACT(IStack)
